fixed tab change bug