Fixed stub serialization