apply jeremy's fix to qrz script as well. minor cleanup.