When I leave it stays there and gives me an error.
Okay, I figured it out. I just needed to make the parts of the widget invisible instead of deleting it.