Troubles with random generator. How persist it?