If you lose the KiXstrip debugging stuff and post in [ CODE ] tags so we could see the indenting, it would be easier to follow.

You do use indenting, right?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.