Fixed proxy bug in Repository class