fixed problem with searchinginsertionindex