fix bad conditional