fixed a bug with Random __thanks Mike__