fix for custom upload directory