Fixed stack errors.