fixed a bug and set a id limit for the objectstore delete