correct the endings of non-class patches