Three-way safety valves