Fix stat to serialize field: fixes #320