Unregistering of events for lua binding
Fix ordering bug
Fix lua event unregistering