fixed the routine for getting webmodforsm and spaces