fix address generation