Upadated check for `q` to proper convention.