fixing export, and fixed sql dump