Fixed recently introduced issue (off by one)