Fixed #671: workaround bad message encoding