fix upload regression bug