fix crash issue of sliceskip and inf-loop in fmo
Merge pull request #1589 from huili2/fix_fmo_sliceskip

fix crash issue of sliceskip and inf-loop in fmo