chunk boundary bug fixes