fix granularity serialization