fix some bug to msg system