inrease sleep from 500ms to 1000ms. still not sure why the tests fail
sometimes.