fixed rand some more