Fixed randSelect in funcs.js