fixes selection : auto-correct when out of bound selection