Fixed OnLuaError hook