Fixed tiles not being rendered when placed in map editor and fixed a small optimization problem.