Fix: fallback for subfolders and query string