Added debug for stack errors.