So when you print it, it actually makes sense?
Add a breakpoint and step through to see what is going on.