sqlite: make series export more robust