corrected phase numbers in check_end