Fixed a problem with the code saving the port as a signed int
Fixed the incorrect saving, loading and handling of the download IDs