Better handling at chunk boundaries