Fix an off by one error at right end.