To fix bug concerning finding multiple behaviours for agent