miscalculation of header_bits when using the -thread option bugfix, patch by (Christo...