fixed semaphore with first last