fix possibility of a twice generated chunk