Fix mongo persistence