Address calculation fix