Fix issue with waiting for the app to paint
Merge pull request #272 from davehunt/fix-app-paint-wait

Fix issue with waiting for the app to paint