I’m still unsure how the input is created. Are you seeing the same issue if you run the tutorial directly?
If not, could you post an executable code snippet with random values, which would reproduce this issue?