fix weak reference test