Improve unregister process