fixed a bug with address generation

address generation failed to work due to a bug made in a previous commit.