Fix small bug in init of repositories.

Found by @pescobar