Fix newlineAndIndent command

Closes #1415