moved a line of code in the tilemanager