fixed issues from windows changes

updated the way the random number generator is initialized