fixed crashing with inlining