correct media getmimetype function