fix error that prevents calculation of prediction