Fixed #42 - Resetting the flag on every toggle of checkbox