fix exception inheritance and cs