Fixing thread safety on ParameterMap