fixes typo
fixes problem with deleteRange with invalid range