fixed encoding vs. mimetype stuff