Fixed a small bug in generateTMX