Fixed send message functionality