fix logic compiler under tail call optimization case