Pneumatic and hydraulic valves