fix upload & download issues