beginning to hack in fixes to the hideously broken refid resolver