fixed bug when try send a message