fixing duplicated prints