Swing the whip shouldn't gain the gun skill level

I just gain the gun skill by swing the whip, I think some one can fix it, and also, the whip swing shouldn’t gain the melee skill if it dosn’t hit anything.