Tweaked to fix a bounding box bug.