Since you don't show the code in any sort of context, you're making us guess. So here's mine. Put in
. I have a feeling that you're not modifying the
that you think you are - i.e., it is not in the proper scope and you may be modifying the hash in a disjoint scope.
If you want real help, you'll have to show the code with enough context to show what is going on.