Bugfix for assertion error when no contours found