context: fix off-by-one