Fixed some issues with chunks being generated on a loop