Bugfix in selection.js.