Fix a race in address assignment