Tab closing fix