fixed upload socket, still some errors