Fixed print error after optimization