Fixed key errors in json_to_plan()