fixed rand missing