fixed issues with prediction