Fix type compatibility of similar integers