fix ui crash