Field stabilization of Alvarez-type cavities