Fixing a nested list