Fix bug in network stack that causes message frame errors

Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>