bugfix in mimetype detection