Fixed a bug in phi while propagation