clear selection before loop