My problem, userxbw, is that you presented your buggy code to the OP as if it was a ready-to-go solution.