fix for detecting mimetypes