random gen fix