diff --git a/Crypto/Number/ModArithmetic.hs b/Crypto/Number/ModArithmetic.hs
--- a/Crypto/Number/ModArithmetic.hs
+++ b/Crypto/Number/ModArithmetic.hs
@@ -61,7 +61,7 @@
         -> Integer -- ^ result
 #if MIN_VERSION_integer_gmp(0,5,1)
 expSafe b e m
-#if MIN_VERSION_integer_gmp(1,0,0)
+#if !(MIN_VERSION_integer_gmp(1,0,0))
     | odd m     = powModSecInteger b e m
 #endif
     | otherwise = powModInteger b e m
diff --git a/crypto-numbers.cabal b/crypto-numbers.cabal
--- a/crypto-numbers.cabal
+++ b/crypto-numbers.cabal
@@ -1,5 +1,5 @@
 Name:                crypto-numbers
-Version:             0.2.6
+Version:             0.2.7
 Description:         Cryptographic numbers: functions and algorithms
 License:             BSD3
 License-file:        LICENSE
@@ -9,7 +9,7 @@
 Synopsis:            Cryptographic numbers: functions and algorithms
 Category:            Cryptography
 Build-Type:          Simple
-Homepage:            http://github.com/vincenthz/hs-crypto-numbers
+Homepage:            https://github.com/vincenthz/hs-crypto-numbers
 Cabal-Version:       >=1.8
 Extra-Source-Files:  Tests/*.hs
 
@@ -61,4 +61,4 @@
 
 source-repository head
   type:     git
-  location: git://github.com/vincenthz/hs-crypto-numbers
+  location: https://github.com/vincenthz/hs-crypto-numbers
