Issue-582. Toggles.java toggling logic is thread-safe now.