Fixed MongoDB backend InvalidDocument Error