bugfix toInternalURL functions and fix download argument order