Fix bytesLoaded and bytesTotal not being set properly