change TS_LUA_MAX_STATE_COUNT to 512