Success !!
Glad it worked out. Got clued in when you said i=5 and it only happens on the rhs of the keyboard, which on my laptop is where the num lock keys are. Dont feel silly about it - I had the problem for ages and it really annoyed me until I realised what was going on. Apart from a tiny little light I never took notice of, there was no other indication that this num lock was activated.
Oggin