fixes issue #1080

semaphore multiple init issue