Fix type of some intermediate values, related to RShift