fixing binary ref