Fixed typo and changed behavior of relay switching to allow instant switch off