Fixed Uploading directory pointer problems