fixup handling of relay and reset