Fixed newline in string error so the line is updated correctly