fixed a bug with chunk concatting