changed order of layer checks