fixing MongoDB persistence