fixes page breaks in template