Fixed stat serialization