fixing deadlock on test