Fixing issue with completed task detection.