fixed bug of newMessage vs data