Fixing directory problems