fix add layers and remove layers