improve the mimetype detection