Fixed some inlining bugs