fixing switch not updating visually when setEnabled() called