bugfix: nested message encoding error