Bug fixes

Resolves an issue with clicking on cell headings causing a crash because
of an argument out of range exception