partial random fix

partial random fix