Fixing bug with data directory