Fix exception on repository problem