Bugfix for Browser issues in adding layers.