fix context key check for optional tabs