fix bug when adding new agent types, noticed by Julius Igugu