fixed error when click on print button