commit to precent crash when indexOrigin is larger than the number of lines being displayed