fixed open close tab bug