Fix bug with switch button