Fixed ramdom code