Fix CommandLoadingThread (replace CountDownLatch with Semaphore)