Fixed single threaded issue