fix some inlining issues