More tweaks for piston code.