Improve chunk generating