several bug fixes
Merge branch 'RC' of https://github.com/morganbp/AgentSystems into RC