clean up tests
fixed test race condition