Properly destroy modals if they are open

This was the reason our backdrops were piling up