delete layers when updating