[Help] Healthbar not redrawing... (VERY BASIC)

This is my first project with Unity and I’m attempting to get a very basic Health bar going.

It draws, and Redraws when the variable changes, although it does not delete the previous rectangle when it draws the new oner. Leaving it at 100/100 health, but when you lose 50, it will say 50/50 ----- 100/100 father to the right.
I have the health bar shrinking with the ammount of health you have, so the text moves.

If you don’t move the text then it just over-laps eachother. Help?

using UnityEngine;
using System.Collections;

public class PlayerHealth : MonoBehaviour {
	public int maxHealth = 100;
	public int currentHealth = 100;
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnGUI() {
		 GUI.Box(new Rect(10, 10, Screen.width / 2 /(maxHealth / currentHealth), 20), currentHealth + "/" + maxHealth);	
	}
	
}

There’s a very big potential problem I see there and that is when the currentHealth actually reaches 0. When it does that, you’ll be getting infinity (since you are essentially dividing by 0). Other than that, why don’t you try using (currentHealth/maxHealth) * (Screen.Width/2)?

Also, I created another bar that was 30 pixels lower, and it does not have this problem. Although the one above it still does.

I found it, I accidentally attatched the script to the terrain, so it was running twice. I was aware of the devision by zero problem, although I was just trying to figure out some basics. Thanks for pointing it out though.