Fixes incorrect placing of new line character.