fixed bug with upload.