all: fixup boundary conditions for scans