Re-enabling on_optimize for code review