Fix added lines not ending in newline