This workaround succeeded for weapon switching if you use different values for different weapons (pistol - 1.0, rifle - 2.0 etc)