fixes to upload to server.