fixed unregister event calls