Fixed an error in Repository