ref: removed duplication in update-msg logic