fix semantics to match what io.Writer requires