backup before UI change.
Fixed some issues that might cause crash.