fix multi layer clearing issue