fix for ending newlines