fixed backward logic of inverted mouse check