Fixed IPSem on windows + added a semaphore for test