fixed bug in chunk parser