Fixed a bug about randomseed.