Fixed semaphore implementation. Q1 completed.