fixed some upload file issues