fixes for layers