fix mass spectrum serialization issue on mac