Changes to cater for chunk boundaries