fix selection mode bug