fix layers working