added guard for undefined repositories