Fixed broken semaphore tests