Added the setting of roles and added a small fix for calling custom behavior methods.