Applied fix for stack errors.