CSV download fixes
Merge pull request #246 from leewillis77/issue_241

CSV download fixes