bug fixes; see spreadsheet