Fix reversed logic