Fix/master/issue 3415

Fixes #3415
Can we find another way instead of sleeping?