some fix about random and id