Added an extra check before changing into buy phase