Fixed some bugs with data message sending