I found the solution myself, anyone having a similar issue in the future can use
msg_apply_changes() from textopsx module after append_hf line.