fix db export script