Fix error in stack frame traversing