Bugfix: semaphore initialized twice (issue #102)