Bugfix in select role javascript