Tests fixes

This caused hell. The test would never finalize. The native side would time out and start the next test in parallel. And some tests are not meant to run in parallel. As a result they were errors on other tests for seemingly not good reasons.