Corrects pred function.