fixed completed task query