Bug with layer adding fixed