fighting against stupid off-by-one error. Me wins!