Screen.width/2 doesn’t seem to be working. ANybody know how to do this?

public float h = 0;
public float w = 0;

    	// Use this for initialization
    	void Start () {
    	   if(h == 0) h = 20; 
               if(w == 0) w = 20;

           }
	
	// Update is called once per frame
	void OnGUI () {
		if(GUI.Button (new Rect(Screen.width / 2 - w/2, Screen.height /  2 - h/2, w, h), "X"))
		{
			print("Hey hey");
			
		}

		
	}