correct calculation of tile coordinate at mouse location