fix warning when saving plugins with 0 plugins enabled (closes #542)
fix uploadicon() returning wrong content-type (closes #543)