* Fix to_string conversion * Fix assert on debug invariant checks * Fix the treatment of the output position when the entire output is committed. * Add unit test