Fixed exporting to CSV

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>