                          step (as-long step)
                          pre-start (- (as-long start) step)
                          span (as-long span)
-                         track (into track [{:format :fixed-step}
-                                            {:chr chrom}
-                                            {:span span}
-                                            {:step step}])]
+                         track (assoc track :format :fixed-step
+                                            :chr chrom
+                                            :span span
+                                            :step step)]
                      (deserialize (rest lines) pre-start track))
 
                    ; data line

                   (let [{:keys [chrom span]
                          :or {span 1}} (->> fields rest fields->map)
                         span (as-long span)
                         track (into track [{:format :variable-step}
                                            {:chr chrom}
                                            {:span span}
                                            {:step nil}])]
                     (deserialize (rest lines) nil track))

                   ; declaration line of fixedStep

    (->> xs
         serialize-wigs
         (interpose \newline)
         (run! #(.write w (str %))))))
