fixed rand prefix logic
fixed rand prefix logic