Added unsafe multi-threading.