Fixed race condition between tests
Added tests