Fixed address function

I had written it according to an older architecture. Should be fixed now.