I've built an underground minecart track to allow me fast travel between two outposts. In the middle I've placed a powered rail, with a long redstone line to each post. I connected these two to a device with two inputs, and one output. When one of the inputs change, so does the output, effectively allowing me to turn the underground powered rail on and off from my outposts, acting sort of as a station. I recently hooked up this device's output to the input of another one of these devices, making the other input a lever so that I may also control the power to the rail from underground.
It powers up perfectly, but when I try to turn it off, it simply won't, even when destroying all redstone wires to it. How can I fix this?