Redo repository correctly