Prevent possible deadlocks during classloading process