Fix mistake in trim address calculation