fix: race condition in prepare-msg processing