Bug in extract backgrounds. If the ROI is too close to the edge of the image, the background ROI will overlap with the edge and as a result return an background_crop.size = 0. This can then cause the context crop to be larger and therefore a negative area for the background trace