Fixed bug with wrong tile position calculation