Fixed the bug the other purpose was not saving when submitting form.
Added CSV header when exporting out of database.