Fixed so both the role and eviroment are used in the search query.