Modified logic to check for callbacks in consumers.