prevented contract ref to be dropped after loading a file. Added listener to update contract ref
chages
added work patterns option group