Fixed exception thrown in celery