Update UI layout
Fix crash issue.