fixing reversed logic in previous commit