fixed a bug with tile addressing