bounding box and layout fixes