Fix message length limiting