Think requirement of use msg_apply_changes after `msg_apply_changes` is need to add. Is required add protections to prevent crash when admin not applied changes?
May be set flag that need to call `msg_apply_changes` and when call processing is finished check flag. If flag is set, then log error message or force apply `msg_apply_changes`.