fixed a bug with querying tables whose column names have special characters