fix duplicate lines