fix handle_msg_promise and handle_msg_accepted