Fixed prediction bug