fix week 4 semaphore