inverted logic bug