OnMouseExit doesn't work through gui

Hello! I have an issue with GUI, so OnMouseExit doesnt works through GUI, when the mouse is not any longer over the object. It works perfectly without GUI. Im using GUI.Buttons and GUI.Box.

    void OnMouseOver()
	{
	    renderer.material.color = Color.green;			
	}
	void OnMouseExit()
	{
        Debug.Log("Exit");
	    renderer.material.color = Color.white;
	}

Fixed by checking

rect.contains(Input.mousePosition);