Modified tests to work better multithreaded