bugfix for selection