Fixed incorrect read of some unsigned values.