Corrected Prediction logic