fix to get column types of query results correctly