Added fixes to send message with JSON attachment