This fixes #8105 and #8103

use integer_types instead