bug in tasks.py