fix miller rabin bug