Fix viewer for subdirectories