restore the "tabvisible" function