Fix reversing of > and < compare operations