fix custom view bug