cleaning of util
small bug fix in prim