fixed crash when loading tmx