fixed bug with csv download