fix exportsql