fixed nosql query after merge