fix for sleeps and more working tests