bugfix in LayerManager:length
bugfix in LayerManager:length
bugfix in LayerManager:length