added invalid_slugs logic