tweak to MLNNO.optimize()