bug fix of selection