fixed some registration issues and added de-registration