Fixed issue where role might not be a string.