fixed tail call elimination check