Fixing bug that caused sent messages to be always trated as byte arrays
instead of respecting contentType header