Use y < height instead of y > 0 in resetPos checks