fixed some message functions
fixed some message api calls