Fixed bug on role query.