Add sleep at waitForActivity to fix bug temporarily