fixed forkIO to spawn in tests