Fixes for rapidjson implementation.