Added tabswitch hook