fix bugs in crawler.py