fixing incorrect variable name when JSON is done