Finally fixed the bug causing download tests to fail