Fixed spreadsheet bugs.