fixed bug switch context