fix double switch