We prove by elementary methods the following generalization of a theorem due to Gleason, Kahane, and Żelazko. Let A be a real algebra with unit 1 such that the spectrum of every element in A is bounded and let φ : A→ C be a linear map such that φ(1) = 1 and (φ(a))2 + (φ(b))2 = 0 for all a, b in A satisfying ab = ba and a2 + b2 is invertible. Then φ(ab) = φ(a)φ(b) for all a, b in A. Similar resu...