Fixed a bug involving agent reset functionality.