fixed bug in --seprepair option of gather.py