unregister emits an error if already unregistered with a badarg error (obviously)