Fixed some bugs when deleting/undoing BBoxes. Repainting works OK now.
In some instances undoing BBoxes doesn't work as expected