If it has been leaking despite a new gasket, surface (plane) the stat housing, as it's important to have two parallel surfaces. If the stat housing is cast iron or cast aluminum, fill any remaining pits with JB Weld or similar, and smooth them out. If the mounting fasteners are studs in the head, be sure to clean the circumference of the studs where they emerge from the head, using a dental pick. If it has been leaking (apparently so) and the surfaces are irregular, use/make a thicker gasket, maybe as much as 5/32", coated with gasket dope (I prefer ol' reliable Permatex #2) on both sides. Tighten evenly, alternating between/among the fasteners.
Am I missing something here?