issue65, fixed incorrect array_rand handling