closed modal at identity switch