fix for #534

This dispateches a event when the app is ready. So we can now wait until we register the mesage handler.
Merge pull request #585 from TitanNano/dev

fix for #534