- Hotfix in setLayer function