fixed a regex fault where one semaphore name was not correctly updated