bugfix on done task query