resolve some upload bugs