fix automatic switch