Added repair db method