Fixed bug unregistering the MBean