fixed sending message bug