Thanks for your answer.
It doesn't go away when i delete those lines. In fact, i'm using them only to avoid this kind of errors.
If i comment out msg_apply_changes() the changes to $rU don't get persistent and i can't find another method to change it.