remove extra whitespace in output of 'query' command