fix bug, when settings have been deleted after page refreshing.