fixing tilt logic