fix for #534

This dispatches an event when the app is ready. So we can now wait until we register the message handler.