fix for layer choser

thanks @jonatkins