fixes #5 and #6 and avoids evaluation on every on/off call