Bugfix to replacement of tiles.