More stuff from trunk (no functional changes)
Fix .to_s5 output

Commit be14bf4eb8 broke this. #&$% stupid me!