Fixed mimeType problem for links and documents