Improvements on the end alignment