The way that the code was written in the last page of yours that I viewed seemed incorrect to me. The reason I asked for the version and OS info was to see if I can reproduce this issue in the same environment. However, it seems now that you are getting the correct output. Can you run through one more additional test and confirm if the results are valid or if you get errors? We would need to be able to reproduce the issue consistently in order to trouble shoot problem.