Fix IndexOutOfBoundsException in UserContextPrediction