fix removeLayer