Important bug fixed in selection mode