Fix bug with p=2 in millerrabin