FInal fix for stack overflow, hopefully