Fix for crash on closing OPS
Merge pull request #354 from alistairmcmillan/FixClosingOPSCrash

Fix for crash on closing OPS