Fixed keyerror on user setting page

Fix #891
Merge pull request #892 from ostcar/issue-891

Fixed keyerror on user setting page