fixed ending newlines