Fix max stack error.