upload fix + tests