Fix instance resolving