This is nice, but I think I've got it working slightly better. I've attached
a patch with my changes, just put the patch in the same directory as qr.sh
and run
patch <qr.patch
and that should fix it up for you.
I am releasing this patch under the terms of the open source. Thank you