Fixing bug on dig lookup