remove unnecessary stack frame