Critical index out of bounds exception fix with getInsertLocation() method.