Fix chunk coding