New length handling in protocol