various upload fixes