fix error in phase 2