Fix bugs of ssam_message's global function