BUG:  Wasn't calculating the end slice correctly for the mask option.