improve finish_msg