agent registration fix