Fix object escaping done for MongoDB