fixed new_mime_magic function