Clean memory store, otherwise crash with jruby + refactoring