fix replace layer_view