fixed bug in random_element for OMS