Fix empty tags and proper fallback.