Fixed off by one error

fixes #17