Fixed Lua problem added a segfault problem