Fixed bug in pin.  Reference bit was not getting set.