Fix problemes with Layers