Using JUCE to wrap older VST 2.4 plugins

Whether I am using your version or my newer JUCE version, dynamically loaded VSTs via the UI or XML specified VSTs, the behaviour is the same.

Things are OK when the plugin is closed with the UI closed, could the internally hosted GUI could be closed down before JUCE shuts it down to avoid what I assume is a run loop problem where the UI ends up closing after the actual plugin does? I saw a few posts with similar problems like that.