Bug fixed in  the file: generic_agent.c

 Redmine issue: 1931 solved