Fix upload - was broken in various ways