partial fix for tab closing feature