fixed bug in chunk_header pointer arithmetic