fixed bugs of $ui.removeLayer