Fix bugs relating to delete repos with stash api