Fix document discovery