copy some tweaks across from pps-use_module