Semaphores working