Fix message size calculation for crypted messages