A modified Mycoplasma protein M or a functional fragment thereof, having one or more amino acid mutations that increase or maintain pH stability or thermostability of the Mycoplasma protein M or a functional fragment thereof relative to wild-type Mycoplasma protein M or a functional fragment thereof, wherein thermostability is maintained up to 75 degrees, 70 degrees, 65 degrees, 60 degrees, 55 degrees, 50 degrees, 45 degrees, 40 degrees, or 38 degrees and/or wherein pH stability is maintained from a pH of 2 to 8, from a pH of 2.5 to 7.5, or from a pH of 4.5 to 7.5.