fix crashes in spreadsheet_to_jsons