fix possible concurrency in loading classes, UP-1278