Workflow detection logic fix.