fixed seg fault and random distribution