fixed crash of uilayer clear