Fix computation of bounding boxes (really)