Fix WriteString overwrites existing lines

Swape i/j