bugfix: off by one