fix layering