Fix for platform-specific bitpoking.

Also minor exception-fiddling.