Fix "shift count >= width of type" issue