Fix a bug in ivy_resolve.