fix bugs that arise when length overhang != 4