resolving OP and event positioning problems when loading a document