Fix repository
Change repository.contents function