Bugfix in task query.