Rewrite chunk borders