make stand-alone shpaml work