fixed duplicated-print problem