Fixed a regression bug in downloading the query results as a text file.