Fixing shifting by number equal to the width of the type

Thanks to Stephen McCamant for advice.

Fixes #78