Fix wrong address generation