added empty_repository handling