Remove extraneous quotes from input queries