Rework structure of rawQuery calls to fix problem with names containing the symbol  '