GUI.Drawtexure progressbar dissapears, when it should just look shorter.

Hello, I have this problem. I have 2 GUI.Drawtexture HUD progressbars. Both have white GUI.Drawtexure backgrounds. The problem is that once I shoot (deduct 1 bullet) the progress bar dissapears and I am left with just background, meanwhile, I have made a HP bar using the same system and the HP bar stays. Can anyone help me out with this? (I know I have foreground/background backwards but it’s ok because the texures are correct. :D)

function OnGUI () {
	GUI.DrawTexture(Rect(10,Screen.height - 60,300,20), AmmoFore);
	GUI.DrawTexture(Rect(10,Screen.height - 60,300 * (InMag / Magsize),20), AmmoBack);
	GUI.DrawTexture(CrossPos, CrossImage);
	if(Reloading == false) {
		GUI.Label(Rect(10,Screen.height - 60,300,20), InMag + "/" + Magsize, AmmoStyle);
	}
	if(Reloading == true) {
		GUI.Label(Rect(10,Screen.height - 60,300,20), "Reloading.", AmmoStyle);
	}
}

I fixed it! Turns out the variables InMag and Magsize were integers. Changed them to float and it works now!