Fixed Debug functions and DebugLua struct layout.