Fix some bugs in address parsing.