Fix smpswriter