fixed empty upload dir bug