Issue #1237: JavaScript exception when adding new candidate genes
Better fix
Merge pull request #1238 from mjshepherd/issue-1237

Issue #1237: JavaScript exception when adding new candidate genes.