repairing NSRef derivation