Fixed the code which causes fail test on ConditionalPhaseTest