Remove old modals when we create new ones, to free memory.