Logical error in matching output address