Fix corrupted tmx

Closes #1532