fixes #27 serialize optional message fails