Added possibility to terminate frokagent while it is in waiting for data state.