Fix some bugs: referring to the wrong phase in two places.