fix rare issue (out of global stack) due to morphological postprocessing