correct switch between layers