fix scan bug in parse.py