tools/json bugfix