Reflect change in leap_cli, use rand_range macro