Fixed spreadsheet bugs.
Merge branch 'issue-42a' into develop