Fix various error handling bugs with spreadsheets/expressjs