Fix addInstance / setInstance