Fixing off-by-one errors... AGAIN!