Fix #4051 console::writeLine() 

This fixes issue #4051