should remove \n from chunk too