fix phrase and paragraph break handling