fixed a bug in Repository->create
implemented Repository->update