bugfixes in layers/dom