replaced dispatch_semaphore_create(1) with dispatch_semaphore_create(0) + signal