removed 2nd getSemaphore caused by the merge