Fix inventory serialization