fixed Custom Semaphore