Some minor fixes for stack failure.