fix multi-threading bug