well that was a massive off-by-one error...