Fixed a bug with tmx layer