Fixed modPow leemon

Fixed key generation on BB. Closes #393