Fixed semaphore stuff