Fixes to repo management