Fix off-by-one bug in fill expansion