Fix bug in validate role