Since we allow end to be negative, end could be -2, -3, etc.

I just merged a pull request with the correct implementation. Please merge.