minor fix semaphore