Fix minor bugs introduced while adding customizeRole support