Changed the sequence of events a bit to ensure reliable operation of the relays