add fix_missing in thinning.py