Some fixes that should make the maintenance process more robust to mime type errors and misc other fixes