Checked the size of phase2_results before accessing phase2_results.front()