when changing size of gameobject bounds do not change

Currently i am changing the size of a game object via:

g.transform.localScale=new Vector2(width,height);

and this correctly changes the width and height by a factor of width and height. This seems to work great, until one has to work with the following piece of code which is designed to place another game object next to the one previously in the list (subs):

 g.transform.position = new Vector3 ((subs[subs.Count-1].renderer.bounds.max.x + g.renderer.bounds.extents.x),transform.position.y,transform.position.z);

in this code subs is a list of gameobjects, and g is the game object to be moved. This code works fine without scaling, but with it it doesn’t. I believe the reason for this is that the bounds are not being updated. Can someone please tell me the best way to rescale a gameobject and also update the bounds?

float actualSize = g.renderer.bounds.x * g.transform.localScale.x;