remove duplicate layers