Fix the UI layout bug of history view