handle parsing chunks properly