Fixed wrong prediction for incomplete ranges.