changed some tests to avoid the problems testing multi-threading.