added missing return if object already exists (autoclass function)