Fixed the bug that the UI is not rendered correctly on device