Rename randpool_getN in randpool_get. Fix bug in randpool_get.