Fix ClassCastException in UserContextPrediction