Fixing automation_type comparison issue