fixed tests to use modified New function
Merge branch 'semaphore'