fix 1D fits writing