Fixed TMX methods giving error by preallocating tables