fix duplicate data bug