Fix roles handling.