(QE-311) Bring just Scott's fix in (closes #20)

@sschneid fixed this in a TB but the rebase was borked. This cherry-picks just his actual commit onto a new branch off of master.