Fix bug in random seed