Fixes for tab switching.