Fix precedence in search terms