fixed bug with 'download as text file' setting