fixed collect.py bug