don't pass a null to destroyScope.  Close #340