Fixes the layer problem