Reverted to old getXTile() and getYTile() code.