Sync commit

Fixed the way the rapidjson document objects are handled