fix bug on uploadfile