Added more error checking to adr_controller when it switches the relays.