backport master branch fix for user vm state listener sending events incompletely