Fix upload/download scripts