fix BasicRepository bug