Fix tile calculation under mouse cursor