merged Phi sequencing bug fix from master