         if let coverId = coverId,
             let coverItem = rootDocument.root["manifest"]["item"].all(withAttributes: ["id": coverId])?.first,
             let coverHref = coverItem.attributes["href"] {
-            return URL(fileURLWithPath: epubDirectoryURL.appendingPathComponent(coverHref).path)
+            return URL(fileURLWithPath: contentDirectoryURL.appendingPathComponent(coverHref).path)
         }
         
         return nil

        }
    }
    
    private func ePubCoverURL(rootDocument: AEXMLDocument, epubDirectoryURL: URL) -> URL? {
        let coverElements = rootDocument.root.all(withAttributes: ["id": "cover-image"])
        
        if let coverElement = coverElements?.first {
            if let href = coverElement.attributes["href"] {
                return epubDirectoryURL.appendingPathComponent(href)
            }
        }
        
        let metaDocument = rootDocument.root["metadata"]

        
        let contentsURL = rootFileURL.deletingLastPathComponent()
        let metadata = self.epubMetaData(rootDocument: rootDocument)
        let manifest = self.manifest(rootDocument: rootDocument)
        let coverURL = self.ePubCoverURL(rootDocument: rootDocument, manifest: manifest, contentDirectoryURL: contentsURL)
        let guide = self.guide(rootDocument: rootDocument)
        let spine = self.spine(rootDocument: rootDocument, manifest: manifest)
        
        let epubContentParser: EPubContentParser = (epubType == .epub2) ? Epub2ContentParser(manifest: manifest, epubContentsURL: contentsURL) : Epub3ContentParser(manifest: manifest, epubContentsURL: contentsURL)
        
        return Epub(contentsURL: epubDirectoryURL, rootFileURL: rootFileURL, type: epubType, coverURL: coverURL)
    }
