made some fixes to how inverses are handled