That's the Problem: on Flush events i got very strange behavior. The document is null. Had it that way you suggest, but will try it again.