adjust UI, and fix crash.