Fixes some bugs regarding to E3 tests suite. Now all semaphore tests have correct results, but test 5 and 9 from clone tests have incorrect results.