Bug fixes in the phrase-based pipeline