tab switch. bug on exit