fix duplicate bug