Added a final forward run after optmization.