Fixing directory variables