Fix some stuff in LuaEngine