fix issue #94, keygen w/ normal math