BugID: 97163

Making sure that the promise of getting messages is resolved before
using them.
Merge branch 'bugid-97163' into dev