Damn off-by-one errors. *shakes fist*