fixed GetRepository method