Fixed hang when run in multiple tests