fixed prediction bugs