Fix errors with composite conditions