Fix off by one

Signed-off-by: Michal Čihař <michal@cihar.com>