fix some message bugs