Bugfix for header not being generated or decoded properly