Fix serialization for mobile client compatibility