fix the issue of app crash