fixed double decode bug in generate_address