fix sendMessage bug