fix undetermined prediction loop