Fix for Dynamo crash at close