Either need a different way to lock, or need to somehow track the clicks across on-offs to determine when to lock.