Fixed a bug where tabs in modals wouldn't work due to being improperly cleaned up