restore swicther after flask work