[metadata] fixed multiple role matching issue