Fix bug in tiles.lua