Fixed a bug in the agent unregistration preventing multipling pairing attempts.