fixed remove header data when a layer is removed