Make optimization reentrant, always output result.