minor fixes of rand_expr