close tabs function
fixed close tab show/hide
fix 'undefined' tabs