fix addr exchange bug
code refine