Fix max call stack error/bug

This fixes an unrelated issue that I saw intermittently when debugging the original error.