Minore fix to the optimization.