Added deregister method to Agent