Fixing a bug in the way roles are passed to app controller