avoid div by zero error
avoid ImageSegmentationError
add debugging to munge