Fix nil repository case