Fix a bug in TileManagerImpl.

Now it costructs the correct number of tiles.