Fixed a bug when rendering at chunck boundries.