Apply #37 pycrypto fix to bug47 branch

Trying to apply this through Github because I'm so sick and tired of checking out this stupid fix branch again and again.