fix '\0' problem on recv msg to upload