Fixed network race condition on linux, added simple test