fix open tab problem