minor bug in layer numbers