fix queries with single quote