fixing wrong tab match bug