Updated bounding boxes drawing algorithm

- bounding boxes will now be drawn in the wrong locations
- bounding boxes will now be drawn upright
- bounding boxes will now be drawn on the root