fix eraseStatic()

Maybe it should not be used for deleting records before and after ESMStore setup simultaneously to simplify.