fixing CSV download bug