Prevent callback recursion