fix ambigous grouping in conditional