added a more effective check for "is_production"