Bugfix in hlp_serialize