prevent agent from getting stuck.