Fixing layer on off problem