another fix for upload_dir